package com.wing.cabinet.model.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 刀具生命周期记录
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("cab_cutter_life_cycle_record")
public class CutterLifeCycleRecord extends BaseEntity<CutterLifeCycleRecord> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 刀具生命周期ID
     */
    private Long cutterLifeCycleId;

    /**
    * 时间
    */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;

    /**
     * 操作人
     */
    private String operator;

    /**
     * 状态
     */
    private CutterLifeCycle.Status status;

    /**
     * 状态描述
     */
    @TableField(exist = false)
    private String statusDesc;

    public String getStatusDesc() {
        return status == null ? null : status.getDesc();
    }

    /**
     * 内容
     */
    private String content;

}
